<%@ page language="java" contentType="text/html; charset=utf-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
    String path = request.getContextPath();
    String showTitle = request.getParameter("showTitle");
    String topNews = request.getParameter("topNews");
%>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
    .sy_body_pic{
        width: 330px;
    }
</style>
<div class="sys-portlet" <%if(!"".equals(topNews)&&topNews!=null){%>style="margin-top:0px;"<%}%>>
    <%if (showTitle != null && showTitle.equals("1")) {%>
    <div class="sys-title1 sys-title-bg1">
        <span class="sys-title-txt1 sys-title-txtbg sys-title-color1">
            <img class="sys-title-ico" src="<%=path%>/res/themes/${sessionScope.SESSION_STREET_THEME.thStyle}/imgs/ico_news.gif" />
            <s:property value="#parameters.title"/>
        </span>
        <div class="sys-more sys-more-ico1" onclick="location.href='<%=path%>/<s:property value="domain"/>/msg/list/<s:property value="msgType"/>'"><div></div></div>
    </div>
    <%}%>
    <table class="portlet-body" width="100%" cellspacing="0" cellpadding="0">
        <tr>
            <td class="sy_body_pic">
                <div id="show" style="width: 330px; height: 176px; overflow: hidden">
                    <s:iterator var="msg" value="picMsgList" status='st'>
                        <s:if test="#st.First">
                            <a href="<%=path%>/<s:property value="domain"/>/msg/item/<s:property value="#msg.msgType"/>/<s:property value="#msg.msgId"/>"><img src="<%=path%><s:property value="#msg.msgCover"/>" width="330" height="176"/></a>
                            </s:if>
                        </s:iterator>
                </div>

            </td>
            <td width="10"></td>
            <td valign="top">
                <table width="100%" cellspacing="0" cellpadding="0"  height="176">
                    <tr align="center" valign="bottom">
                        <a style="color: red; " target="_blank" href="<%=path%>/<s:property value="domain"/>/msg/item/<s:property value="txtMsg.msgType"/>/<s:property value="txtMsg.msgId"/>"><s:property value="txtMsg.msgTitle"/></a>
                        
                    </tr>
                        <tr>
                            <td >
                                <div id="showText" style="height: 162px; overflow: none; margin-right: 5px" >
                                    <s:if test="%{null!=txtMsg.msgContent&&txtMsg.msgContent.length()>450}">
                                        <s:property value="%{txtMsg.msgContent.substring(0, 440)}" />
                                    </s:if>
                                    <s:else>
                                        <s:property value="%{txtMsg.msgContent}"/>
                                    </s:else>
                                </div>
                            </td>
                        </tr>
                </table>
            </td>
        </tr>
    </table>
</div>
    <script type="text/javascript">
          var showText = document.getElementById("showText").innerText;
          document.getElementById("showText").innerHTML=showText+'<a style="color: red" target="_blank" href="<%=path%>/<s:property value="domain"/>/msg/item/<s:property value="txtMsg.msgType"/>/<s:property value="txtMsg.msgId"/>">【详细】</a>';
          
    </script>